package intelligentcity.system;

import intelligentcity.memoirs.Diary;

public abstract class IntelligentLights extends Lights implements IIntelligentLights {

    protected Diary diary;

    public IntelligentLights() {
        super();
    }

    public IntelligentLights(int numberOfState) {
        super(numberOfState);
    }

    @Override
    protected final void changeTimes() {
        think();
    };

    protected abstract void think();

    @Override
    public final Diary getDiary() {
        return diary;
    }

    @Override
    public final void setDiary(Diary diary) {
        this.diary = diary;
    }

    @Override
    protected final synchronized int getTimeWE() {
        return super.getTimeWE();
    }

    @Override
    protected final synchronized void setTimeNS(int timeNS) {
        super.setTimeNS(timeNS);
    }

    @Override
    protected final synchronized void setTimeWE(int timeWE) {
        super.setTimeWE(timeWE);
    }

    @Override
    protected final synchronized int getTimeNS() {
        return super.getTimeNS();
    }

}
